package com.iwhalecloud.bss.kite.cucc.service.scene.loader.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.iwhalecloud.bss.kite.cucc.client.api.order.ICommonSevice;
import com.iwhalecloud.bss.kite.cucc.client.dto.pos.KitePosDTO;
import com.iwhalecloud.bss.kite.cucc.service.scene.loader.CuccInstLoader;
import com.iwhalecloud.bss.kite.manager.api.IQuerySceneInstService;
import com.ztesoft.bss.common.bo.LoginInfo;

@Service
public class CuccCommonAttrLoader extends CuccInstLoader {

    @Autowired
    private ICommonSevice commonService;
    
    @Autowired
    private IQuerySceneInstService querySceneInstService;
    
    @Override
    public void loadInst(String sceneInstId, String operType, String custId, String staffId, KitePosDTO kitePosDTO, LoginInfo loginInfo) {
        String serviceOfferId = this.querySceneInstService.getSceneInst(sceneInstId).getServiceOfferId();
        this.commonService.initCommonAttrValues(sceneInstId, serviceOfferId, custId, kitePosDTO, loginInfo);
    }

}
